<?php use_javascript('/js/dropdown/script.js') ?>
<div class="vaalikbox">
    <div class="boxname">
	<p><?php echo __('sorteeri') ?>:</p>
    </div>
    <form action="<?php echo LinkGen::getInstance(LinkGen::STRUCTURE)->link($node['id']) ?>" method="get">
	<?php echo $form->renderHiddenFields(true) ?>
	<div class="vaalikud">

		<div class="vaalikurow">
		    <?php include_partial('homepage/customdropdown_form_field', array('field' => $form['brand_name'] ))?>
		    <?php include_partial('homepage/customdropdown_form_field', array('field' => $form['product_group']))?>
		    <div class="clear"></div>
		</div>
		<div class="vaalikurow last">
		    <?php include_partial('homepage/customdropdown_form_field', array('field' => $form['price']))?>
		    <?php include_partial('homepage/customdropdown_form_field', array('field' => $form['sort']))?>
		    <div class="clear"></div>
		</div>
	</div>
	<div class="vaalikubutton">
	    <div class="korvlinkactive">
		<div class="korvlinkleft"></div>
		<div class="korvlinkcenter">
		    <p><a id="valikud_submit" href="#"><?php echo __('vali') ?></a></p>
		</div>
		<div class="korvlinkright"></div>
	    </div>
	</div>
    </form>
    <div class="clear"></div>
</div>
<script type="text/javascript">
    $('#valikud_submit').click(function(e){
	e.preventDefault();
	$(this).parents('form').submit()
	return false;
    });
</script>